#ifndef CUBEMAP_H
#define CUBEMAP_H

#include <map>
#include <string>
#include "geometry.h"
#include "line.h"

class Image
{
public:
	unsigned width;
	unsigned height;
	int bpp; //bits per pixel
	unsigned char * data; //bytes with the pixel information
	bool loadTGA(const char* filename);
	COLOR getPixelColorUV(float u, float v);
	COLOR getPixelColor(unsigned x, unsigned y);
	
	Image(const char* filename){ loadTGA(filename);}
	Image(){}
	~Image(){}
};

class Cubemap
{
	public:
		bool inited;
		Image up;
		Image forward;
		Image back;
		Image left;
		Image right;
		Image down;
		Cubemap();

		void init(const char * fileup, const char * filedown, const char * fileback, const char * fileforward, const char * fileright, const char * fileleft);
		COLOR getCubeMapColor(const CLine &line);
};

#endif